package com.bifrost.model.brand;

import com.bifrost.validator.group.IsAdd;
import com.bifrost.validator.group.IsUpdate;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;

/**
 * @com.bifrost.model.brand
 * @wechat-mall
 * @lee Create Class on 2018/4/12
 */
@ApiModel("品牌模型")
@Data
public class ProductBrandModel implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "品牌id不能为空" , groups = IsUpdate.class)
    @Null(message = "品牌id必须为空" , groups = IsAdd.class)
    private Long productBrandId;

    private String img;

    @NotBlank(message = "品牌名称不能为空" , groups = {IsAdd.class, IsUpdate.class})
    private String brandName;
    private String brandNav;
    //品牌所有者
    private String brandOwner;
    //品牌生产地
    private String brandOrigin;
    //private String brandCode;
    //品牌风格
    private String brandStyle;
    @NotBlank(message = "品牌图片不能为空" , groups = {IsAdd.class, IsUpdate.class})
    private String hash;
    //private String canonicalUrl;

    private String description;

    @JsonIgnore
    private Boolean archived = Boolean.FALSE;
    private Integer sortOrder = 1;

}
